//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<CConstantVertex9.h>
///	@path	~/src/graphics/dx9/
///	@date	2008/12/28
///	@desc	Vertices that cannot be modified any more.

#pragma once

#include "xeres.h"

#include "graphics/IVertexBuffer.h"
#include "graphics/dx9/CDevice9.h"
#include "graphics/dx9/CBaseVertex9.h"

namespace xeres {

	/*! 
		\class	CConstantVertex9
		\brief
	*/
	class CConstantVertex9 : public CBaseVertex9
	{
	public:

		/// \ctor
		CConstantVertex9( IDirect3DVertexBuffer9 * buffer , size_t count , size_t stride );

		/// \dtor
		virtual ~CConstantVertex9( void );

		DECL_IOBJECT_CLASS( CConstantVertex9 , CBaseVertex9 );

	public:

		/// \name Vertex Buffer Interface
		//@{

		/// \impl
		virtual bool Map( bool discard , ResourceMap& data );

		/// \impl
		virtual bool ReadBack( ResourceMap& data , bool readonly );

		/// \impl
		virtual bool Unmap( void );

		//@}
	};
	
} // namespace xeres
